#!/usr/bin/python
# -*- coding: UTF-8 -*-
 
def fact(j):
    sum = 0
    if j == 0:
        sum = 1
    else:
        sum = j * fact(j - 1)
    return sum
 
# print (fact(5))
# 0!到5！
print(list(map(fact,range(6))))
print([fact(n) for n in range(6)])

# 5！的奇数阶乘
print(list(map(fact,filter(lambda n: n % 2,range(6)))))
print([fact(n) for n in range(6) if n % 2])



a = [x**2 for x in range(10) if x%2]
print(a)


a = [(i,j) for i in range(3) for j in range(3)]
print(a)